package com.sc.web.gwt.client;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.place.shared.PlaceController;
import com.sc.web.gwt.client.view.AdministratorWidget.AdministratorWidgetView;
import com.sc.web.gwt.client.view.AdministratorWidget.AdministratorWidgetViewImpl;
import com.sc.web.gwt.client.view.LoginWidget.LoginWidgetView;
import com.sc.web.gwt.client.view.LoginWidget.LoginWidgetViewImpl;
import com.sc.web.gwt.client.view.RegisterWidget.RegisterWidgetView;
import com.sc.web.gwt.client.view.RegisterWidget.RegisterWidgetViewImpl;

public class ClientFactoryImpl implements ClientFactory {
    private final EventBus eventBus = new SimpleEventBus();
    private final PlaceController placeController = new PlaceController(eventBus);
    private final LoginWidgetView loginWidgetView = new LoginWidgetViewImpl();
    private final AdministratorWidgetView administratorWidgetView = new AdministratorWidgetViewImpl();
    private final RegisterWidgetView registerWidgetView = new RegisterWidgetViewImpl();

    public EventBus getEventBus() {
        return eventBus;
    }

    public PlaceController getPlaceController() {
        return placeController;
    }

    public LoginWidgetView getLoginWidgetView() {
        return loginWidgetView;
    }

    public AdministratorWidgetView getAdministratorWidgetView() {
        return administratorWidgetView;
    }

    public RegisterWidgetView getRegisterWidgetView() {
        return registerWidgetView;
    }
}

